#include<iostream>
using namespace std;

class A
{
public:
    virtual void Show()
    {
        cout << "A::Show()" << endl;
    }
public:
    int ma = 10;
};

class B : public A
{
public:
    void Show()
    {
        cout << "B::Show" << endl;
    }
public:
    int ma = 20;
};

int main()
{
    A *pa = NULL;
    B *pb = NULL;
    B b;
    pa = &b;
    pa->Show();
    pb = &b;
    pb->Show(); 
    A a;
    pa = &a;
    pa->Show();
    return 0;
}

